<?php
/**
 * 作者：New一个
 * 主页：http://www.newyige.com
 * 描述：文章归档模板
 * 时间：2016.05.16
 */
?>
<?php get_header(); ?>

<div class="content fl">
  <?php if (have_posts()) : ?>
  <?php while (have_posts()) : the_post(); ?>
  <?php set_post_views(get_the_ID()); ?>
  <div class="single_content">
    <div class="single_head">
      <h1>
        <?php the_title(); ?>
      </h1>
      <div class="single_info">
        <?php echo '<span class="time">'. get_the_time('Y-m-d h:i:s').'</span>';
        echo '<span class="author">来源：';
		if(get_post_source_text(get_the_ID())){
        echo '<a target="_blank" href="'. get_post_source_url(get_the_ID()) .'">'. get_post_source_text(get_the_ID()) .'</a>';
         }else { 
        echo '原创';
         }
        echo '</span>';
        echo '<span class="author">作者：'.get_the_author_posts_link().'</span>';
		echo '<span class="category">分类：', the_category(', ') ,'</span>';
		echo '<span class="views">浏览：'.get_post_views(get_the_ID()).'</span>';
		echo '<span class="comment"><a target="_blank" href="' . get_the_permalink() . '#comments">评论：' .  get_post(get_the_ID()) -> comment_count . '</a></span>';
        echo '<span class="edit">', edit_post_link('编辑'),'</span>';?>
      </div>
    </div>
    <div class="single_text">
      <?php the_content(); ?>
    </div>
    <div class="single_tags">
      <?php echo span_tags(text); ?>
    </div>
    <div class="single_share">
      <?php get_share() ?>
    </div>
  </div>
  <div class="single_download">
    <span class="show"><a href="">在线演示</a></span> <?php echo span_download(text) . span_like(text);?> <span class="reward"><a>打赏站长</a></span><span class="comment"><a href="#comments">发表评论</a></span>
  </div>
  <?php single_page(); ?>
  <?php single_related(); ?>
  <?php comments_template(); ?>
  <?php endwhile; else: ?>
  <?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
